<template>
	<view class="box">
		<uNavbar title="秘境详情" bgColor="#262241"></uNavbar>
		<!--我接收的 -->
		<view v-if="types == 0">
			<view class="main_from" >
				<view class="main_from_bottom">
					<view class="main_from_bottom_item">
						<text class="c0" >秘境名称</text>
						<text class="c4" >{{infoDetail.name}}</text>
					</view>
					<view class="main_from_bottom_item">
						<text class="c0">秘境开始时间</text>
						<text class="c4" >{{infoDetail.create_time}}</text>
					</view>
			 
					<view class="main_from_bottom_item">
						<text class="c0" >秘境结束时间</text>
						<text class="c4">{{infoDetail.end_time}}</text>
					</view>
					<view class="main_from_bottom_item">
						<text class="c0" >激活藏品数量</text>
						<text class="c4"> x{{joinNumber}}</text>
					</view>
				</view>
			</view>
			<view class="activation_box flex_Z">
				<text>激活藏品</text>
				<view class="activation flex_dq" v-for="(item,index) in activationList"  :key="index">
					<image :src="item.goods.goods_image" mode=""></image>
					<view class="activation_name flex_Z">
						<text class="c0 f30">{{item.goods.goods_name}}</text>
						<view class="number">
							<text>编号:</text>
							{{item.goods_number}}
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view  v-if="types == 1">
			<view class="main_from">
				<view class="main_from_bottom">
					<view class="main_from_bottom_item">
						<text class="c0" >挖宝藏品</text>
						<text class="c4" >{{infoDetail.name}}</text>
					</view>
					<view class="main_from_bottom_item">
						<text class="c0">藏品数量</text>
						<text class="c4"> x{{joinNumber}}</text>
					</view>
			
					<view class="main_from_bottom_item">
						<text class="c0" >秘境激活时间</text>
						<text class="c4" > {{mjDetails.create_time}}</text>
					</view>
					<view class="main_from_bottom_item">
						<text class="c0" >剩余时间</text>
						<text class="c4">{{mjDetails.surplus_time}}</text>
					</view>
					<view class="main_from_bottom_item">
						<text class="c0" >挖宝状态</text>
						<text class="c4">{{mjDetails.status_desc}}</text>
					</view>
					<!-- <view class="main_from_bottom_item">
						<text class="c0" >开始挖宝时间</text>
						<text class="c4" >{{mjDetails.create_time}}</text>
					</view> -->
				</view>
<!-- 				<view class="dig flex_Z">
					<text class="f32 c0">挖宝奖励</text>
					<view class="dig_box flex_ld">
						<view class=" flex_dq">
							<image class="dig_img" src="../../static/image/bg6.png" mode=""></image>
							<text class="c0">首发抢购凭证</text>
						</view>
						<text class="c2">x2</text>
					</view>
					<view class="dig_box flex_ld">
						<view class=" flex_dq">
							<image class="dig_img" src="../../static/image/bg6.png" mode=""></image>
							<text  class="c0">首发抢购凭证</text>
						</view>
						<text  class="c2">x2</text>
					</view>
				</view> -->
			</view>
			<view class="activation_box flex_Z">
				<text>激活藏品</text>
				<view class="activation flex_dq" v-for="(item,index) in activationList"  :key="index"> 
					<image :src="item.goods.goods_image" mode=""></image>
					<view class="activation_name flex_Z">
						<text class="c0 f30">{{item.goods.goods_name}}</text>
						<view class="number">
							<text>编号:</text>
							{{item.goods_number}}
						</view>
					</view>
				</view>
			</view>
		</view>
	
	</view>

</template>

<script>
	import {memberBrandActivityDetail} from "../../api/secretRealm.js"
	export default {
		data() {
			return {
				id:'',
				types:'',
				proportion:'',//比例
				joinNumber:'',
				mjDetails:{},
				infoDetail:{},
				activationList:{}
			}
		},
		onLoad(e) {
			console.log(e)
			this.types = e.type
			this.id = e.id
			this.init()
		},
		methods: {
			init(){
				let data = {
					id:this.id
				}
				memberBrandActivityDetail(data).then(res=>{
					console.log(res);
					if (res.code == 1) {
						this.mjDetails = res.data
						this.joinNumber = res.data.join_number
						this.infoDetail = res.data.brand_activity
						this.activationList = res.data.member_brand_activity_details
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		width: 750rpx;
		height: 100vh;
		background-color: #262241;
		position: relative;
	}
	.main_from {
		width: 690rpx;
		// height: 472rpx;
		background: #3C2F65;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 0 auto;
		margin-top: 40rpx;
		// padding: 10rpx 0;
		
		.main_from_bottom{
			width: 630rpx;
			// height: 420rpx;
			margin: 0 auto;
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			.title{
				font-size: 32rpx;
				color: #D8D5E0;
				margin-bottom: 10rpx;
			}
			.main_from_bottom_item{
				display: flex;
				justify-content: space-between;
				margin-bottom: 10rpx;
				align-items: center;
				padding: 10rpx 0;
			}
		}
	}

	.main_btn_wrap{
		width: 630rpx;
		height: 100rpx;
		margin: 0 auto;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		.zz_btn{
			width: 122rpx;
			height: 52rpx;
			border-radius: 536rpx 536rpx 536rpx 536rpx;
			border: 2rpx solid #A6A5AF;
			font-size: 26rpx;
			color: #A7A4AD;
			text-align: center;
			line-height: 52rpx;
		}
		.gm_btn{
			width: 122rpx;
			height: 52rpx;
			border-radius: 536rpx 536rpx 536rpx 536rpx;
			border: 2rpx solid #FF2CDF;
			font-size: 26rpx;
			color: #FF2CDF;
			text-align: center;
			line-height: 52rpx;
			margin-right: 30rpx;
			margin-left: 30rpx;
		}
		
	}
	.dig{
		width: 92%;
		margin: 30rpx auto;
		border-top: 1rpx solid #ffffff50;
	}
	.dig>text{
		font-size: 32rpx;
		color: #ffffff;
		margin: 30rpx 0;
	}
	.dig_box{
		font-size: 32rpx;
		// background: pink;
		margin-bottom: 30rpx;
	}
	.dig_img{
		width: 88rpx;
		height: 88rpx;
		border-radius: 10rpx;
		margin-right: 24rpx;
	}
	
	
	.activation_box{
		margin-top: 50rpx;
	}
	.activation_box>text{
		font-size: 32rpx;
		color: #ffffff;
		margin-left: 32rpx;
		margin-bottom: 30rpx;
	}
	.activation{
		width: 690rpx;
		height: 148rpx;
		background: #3C2F65;
		border-radius:16rpx;
		margin: 10rpx auto;
	}
	.activation>image{
		width: 108rpx;
		height: 108rpx;
		margin: 20rpx;
		border-radius: 10rpx;
	}
	.activation_name{
		
	}
	.number{
		font-size: 24rpx;
		color: #ffffff;
		background: #2B2951;
		padding:10rpx  10rpx 10rpx 0;
		border-radius: 10rpx;
		margin-top: 10rpx;
	}
	.number>text:nth-child(1){
		width: 64rpx;
		height: 36rpx;
		background: linear-gradient( 274deg, #0014FF 0%, #8020EF 50%, #FF2CDF 100%);
		border-radius: 6rpx;
		color: #ffffff;
		font-size: 22rpx;
		padding: 6rpx 10rpx ;
	}
	
	
	
	
	
	
	
</style>